package com.wthink.newMain.settings

import android.content.Intent
import android.os.Bundle
import android.view.View
import androidx.activity.viewModels
import androidx.appcompat.app.AppCompatActivity
import androidx.databinding.DataBindingUtil
import com.wthink.hzgj.R
import com.wthink.hzgj.databinding.ActivityMenuBinding
import com.wthink.newMain.cameraSettings.CameraSettingsActivity
import com.wthink.newMain.settings.viewmodel.MenuViewmodel
import com.wthink.newMain.stationStudy.StationStudyActivity

class MenuActivity : AppCompatActivity() {

    lateinit var binding: ActivityMenuBinding
    private val viewModel by viewModels<MenuViewmodel>()

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        binding = DataBindingUtil.setContentView(this, R.layout.activity_menu)
        binding.lifecycleOwner = this
        binding.viewModel = viewModel

        binding.back.setOnClickListener {
            finish()
        }
    }

    fun settings(view: View?) {
        val intent = Intent(this, SettingsActivity::class.java)
        startActivity(intent)
    }

    fun study(view: View?) {
        val intent = Intent(this, StationStudyActivity::class.java)
        startActivity(intent)
    }

    fun videoAlive(view: View?) {
        val intent = Intent(this, CameraSettingsActivity::class.java)
        startActivity(intent)
    }

}